Optimal. Leaf size=102 \[ -\frac {e x^r \left (a+b \log \left (c x^n\right )\right )}{d^2 r \left (d+e x^r\right )}-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {d x^{-r}}{e}\right )}{d^2 r}+\frac {b n \log \left (d+e x^r\right )}{d^2 r^2}+\frac {b n \text {Li}_2\left (-\frac {d x^{-r}}{e}\right )}{d^2 r^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.16, antiderivative size = 102, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {2391, 2379,
2438, 2373, 266} \begin {gather*} \frac {b n \text {PolyLog}\left (2,-\frac {d x^{-r}}{e}\right )}{d^2 r^2}-\frac {\log \left (\frac {d x^{-r}}{e}+1\right ) \left (a+b \log \left (c x^n\right )\right )}{d^2 r}-\frac {e x^r \left (a+b \log \left (c x^n\right )\right )}{d^2 r \left (d+e x^r\right )}+\frac {b n \log \left (d+e x^r\right )}{d^2 r^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 266
Rule 2373
Rule 2379
Rule 2391
Rule 2438
Rubi steps
\begin {align*} \int \frac {a+b \log \left (c x^n\right )}{x \left (d+e x^r\right )^2} \, dx &=\frac {\int \frac {a+b \log \left (c x^n\right )}{x \left (d+e x^r\right )} \, dx}{d}-\frac {e \int \frac {x^{-1+r} \left (a+b \log \left (c x^n\right )\right )}{\left (d+e x^r\right )^2} \, dx}{d}\\ &=-\frac {e x^r \left (a+b \log \left (c x^n\right )\right )}{d^2 r \left (d+e x^r\right )}-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {d x^{-r}}{e}\right )}{d^2 r}+\frac {(b n) \int \frac {\log \left (1+\frac {d x^{-r}}{e}\right )}{x} \, dx}{d^2 r}+\frac {(b e n) \int \frac {x^{-1+r}}{d+e x^r} \, dx}{d^2 r}\\ &=-\frac {e x^r \left (a+b \log \left (c x^n\right )\right )}{d^2 r \left (d+e x^r\right )}-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {d x^{-r}}{e}\right )}{d^2 r}+\frac {b n \log \left (d+e x^r\right )}{d^2 r^2}+\frac {b n \text {Li}_2\left (-\frac {d x^{-r}}{e}\right )}{d^2 r^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.21, size = 132, normalized size = 1.29 \begin {gather*} \frac {\frac {d r \left (a+b \log \left (c x^n\right )\right )}{d+e x^r}+b n \log \left (d-d x^r\right )-a r \log \left (d-d x^r\right )+b r \left (n \log (x)-\log \left (c x^n\right )\right ) \log \left (d-d x^r\right )+b n \left (\frac {1}{2} r^2 \log ^2(x)+\left (-r \log (x)+\log \left (-\frac {e x^r}{d}\right )\right ) \log \left (d+e x^r\right )+\text {Li}_2\left (1+\frac {e x^r}{d}\right )\right )}{d^2 r^2} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.16, size = 715, normalized size = 7.01
method | result | size |
risch | \(\frac {b \ln \left (d +e \,x^{r}\right ) n \ln \left (x \right )}{r \,d^{2}}-\frac {b n \ln \left (x \right )}{r d \left (d +e \,x^{r}\right )}-\frac {b \ln \left (x^{r}\right ) n \ln \left (x \right )}{r \,d^{2}}-\frac {b n \dilog \left (\frac {d +e \,x^{r}}{d}\right )}{r^{2} d^{2}}-\frac {b n \ln \left (x \right ) \ln \left (\frac {d +e \,x^{r}}{d}\right )}{r \,d^{2}}+\frac {b n \ln \left (x \right )^{2}}{2 d^{2}}+\frac {b \ln \left (c \right )}{r d \left (d +e \,x^{r}\right )}+\frac {b \ln \left (c \right ) \ln \left (x^{r}\right )}{r \,d^{2}}-\frac {b \ln \left (c \right ) \ln \left (d +e \,x^{r}\right )}{r \,d^{2}}+\frac {i b \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{3} \ln \left (d +e \,x^{r}\right )}{2 r \,d^{2}}-\frac {i b \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{3} \ln \left (x^{r}\right )}{2 r \,d^{2}}-\frac {i b \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{3}}{2 r d \left (d +e \,x^{r}\right )}-\frac {b \ln \left (d +e \,x^{r}\right ) \ln \left (x^{n}\right )}{r \,d^{2}}+\frac {b \ln \left (x^{n}\right )}{r d \left (d +e \,x^{r}\right )}+\frac {b \ln \left (x^{r}\right ) \ln \left (x^{n}\right )}{r \,d^{2}}-\frac {i b \pi \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \ln \left (d +e \,x^{r}\right )}{2 r \,d^{2}}+\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \ln \left (x^{r}\right )}{2 r \,d^{2}}-\frac {b n e \ln \left (x \right ) x^{r}}{r \,d^{2} \left (d +e \,x^{r}\right )}+\frac {i b \pi \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{2 r d \left (d +e \,x^{r}\right )}+\frac {i b \pi \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \ln \left (x^{r}\right )}{2 r \,d^{2}}-\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \ln \left (d +e \,x^{r}\right )}{2 r \,d^{2}}+\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{2 r d \left (d +e \,x^{r}\right )}+\frac {a \ln \left (x^{r}\right )}{r \,d^{2}}-\frac {a \ln \left (d +e \,x^{r}\right )}{r \,d^{2}}+\frac {a}{r d \left (d +e \,x^{r}\right )}+\frac {b n \ln \left (d +e \,x^{r}\right )}{d^{2} r^{2}}+\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right ) \ln \left (d +e \,x^{r}\right )}{2 r \,d^{2}}-\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )}{2 r d \left (d +e \,x^{r}\right )}-\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right ) \ln \left (x^{r}\right )}{2 r \,d^{2}}\) | \(715\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 229 vs.
\(2 (102) = 204\).
time = 0.33, size = 229, normalized size = 2.25 \begin {gather*} \frac {b d n r^{2} \log \left (x\right )^{2} + 2 \, b d r \log \left (c\right ) + 2 \, a d r + {\left (b n r^{2} e \log \left (x\right )^{2} + 2 \, {\left (b r^{2} e \log \left (c\right ) - {\left (b n r - a r^{2}\right )} e\right )} \log \left (x\right )\right )} x^{r} - 2 \, {\left (b n x^{r} e + b d n\right )} {\rm Li}_2\left (-\frac {x^{r} e + d}{d} + 1\right ) - 2 \, {\left (b d r \log \left (c\right ) - b d n + a d r + {\left (b r e \log \left (c\right ) - {\left (b n - a r\right )} e\right )} x^{r}\right )} \log \left (x^{r} e + d\right ) + 2 \, {\left (b d r^{2} \log \left (c\right ) + a d r^{2}\right )} \log \left (x\right ) - 2 \, {\left (b n r x^{r} e \log \left (x\right ) + b d n r \log \left (x\right )\right )} \log \left (\frac {x^{r} e + d}{d}\right )}{2 \, {\left (d^{2} r^{2} x^{r} e + d^{3} r^{2}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 206.76, size = 360, normalized size = 3.53 \begin {gather*} - \frac {a e \left (\begin {cases} \frac {x^{r}}{d^{2}} & \text {for}\: e = 0 \\- \frac {1}{d e + e^{2} x^{r}} & \text {otherwise} \end {cases}\right )}{d r} - \frac {a e \left (\begin {cases} \frac {x^{r}}{d} & \text {for}\: e = 0 \\\frac {\log {\left (d + e x^{r} \right )}}{e} & \text {otherwise} \end {cases}\right )}{d^{2} r} + \frac {a \log {\left (x^{r} \right )}}{d^{2} r} + \frac {b e n \left (\begin {cases} \frac {\begin {cases} \frac {x^{r}}{r} & \text {for}\: r \neq 0 \\\log {\left (x \right )} & \text {otherwise} \end {cases}}{d^{2}} & \text {for}\: e = 0 \\- \begin {cases} \frac {\log {\left (x \right )}}{e^{2}} & \text {for}\: d = 0 \wedge r = 0 \\- \frac {x^{- r}}{e^{2} r} & \text {for}\: d = 0 \\\frac {\log {\left (x \right )}}{d e + e^{2}} & \text {for}\: r = 0 \\\frac {\log {\left (x \right )}}{d e} - \frac {\log {\left (\frac {d}{e} + x^{r} \right )}}{d e r} & \text {otherwise} \end {cases} & \text {otherwise} \end {cases}\right )}{d r} - \frac {b e \left (\begin {cases} \frac {x^{r}}{d^{2}} & \text {for}\: e = 0 \\- \frac {1}{d e + e^{2} x^{r}} & \text {otherwise} \end {cases}\right ) \log {\left (c x^{n} \right )}}{d r} + \frac {b e n \left (\begin {cases} \frac {\begin {cases} \frac {x^{r}}{r} & \text {for}\: r \neq 0 \\\log {\left (x \right )} & \text {otherwise} \end {cases}}{d} & \text {for}\: e = 0 \\\frac {\begin {cases} - \frac {\operatorname {Li}_{2}\left (\frac {e x^{r} e^{i \pi }}{d}\right )}{r} & \text {for}\: \frac {1}{\left |{x}\right |} < 1 \wedge \left |{x}\right | < 1 \\\log {\left (d \right )} \log {\left (x \right )} - \frac {\operatorname {Li}_{2}\left (\frac {e x^{r} e^{i \pi }}{d}\right )}{r} & \text {for}\: \left |{x}\right | < 1 \\- \log {\left (d \right )} \log {\left (\frac {1}{x} \right )} - \frac {\operatorname {Li}_{2}\left (\frac {e x^{r} e^{i \pi }}{d}\right )}{r} & \text {for}\: \frac {1}{\left |{x}\right |} < 1 \\- {G_{2, 2}^{2, 0}\left (\begin {matrix} & 1, 1 \\0, 0 & \end {matrix} \middle | {x} \right )} \log {\left (d \right )} + {G_{2, 2}^{0, 2}\left (\begin {matrix} 1, 1 & \\ & 0, 0 \end {matrix} \middle | {x} \right )} \log {\left (d \right )} - \frac {\operatorname {Li}_{2}\left (\frac {e x^{r} e^{i \pi }}{d}\right )}{r} & \text {otherwise} \end {cases}}{e} & \text {otherwise} \end {cases}\right )}{d^{2} r} - \frac {b e \left (\begin {cases} \frac {x^{r}}{d} & \text {for}\: e = 0 \\\frac {\log {\left (d + e x^{r} \right )}}{e} & \text {otherwise} \end {cases}\right ) \log {\left (c x^{n} \right )}}{d^{2} r} + \frac {b n \left (\begin {cases} 0 & \text {for}\: r = 0 \\- \frac {\log {\left (x^{r} \right )}^{2}}{2 r} & \text {otherwise} \end {cases}\right )}{d^{2} r} + \frac {b \log {\left (x^{r} \right )} \log {\left (c x^{n} \right )}}{d^{2} r} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {a+b\,\ln \left (c\,x^n\right )}{x\,{\left (d+e\,x^r\right )}^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________